/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 * Description: remote ipc rma buff interface
 */

#ifndef REMOTE_IPC_RMA_BUFFER_H
#define REMOTE_IPC_RMA_BUFFER_H

#include <memory>
#include <string>
#include "hccl_common.h"
#include "hccl_network_pub.h"
#include "rma_buffer.h"

namespace hccl {
class RemoteIpcRmaBufferImpl;

class RemoteIpcRmaBuffer : public RmaBuffer {
public:
    RemoteIpcRmaBuffer(const HcclNetDevCtx netDevCtx);
    HcclResult Deserialize(const std::string&);
    HcclResult Open();
    HcclResult Close();
    ~RemoteIpcRmaBuffer() override;

    RemoteIpcRmaBuffer(const RemoteIpcRmaBuffer &that) = delete;
    RemoteIpcRmaBuffer &operator=(const RemoteIpcRmaBuffer &that) = delete;

private:
    std::unique_ptr<RemoteIpcRmaBufferImpl> pimpl_;
};
}
#endif //  REMOTE_IPC_RMA_BUFFER_H